﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;

namespace Acme.BookStore.Purchase.Customergoods
{
    public class GoodCodeModel:AuditedAggregateRoot<Guid>
    {

        /// <summary>
        /// 商品编码
        /// </summary>
        public string ProductCode { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int Quantity { get; set; }

        /// <summary>
        /// 计划占用储位数
        /// </summary>
        public int PlannedStorageSlots { get; set; }

        /// <summary>
        /// 收货完成状态
        /// </summary>
        public CustomerGoodItemStatusModel Status { get; set; }

        /// <summary>
        /// 所属进货通知单号（外键）
        /// </summary>
        public string CustomerOrderNo { get; set; }

        /// <summary>
        /// 导航属性 - 所属进货通知单
        /// </summary>
        public virtual CustomergoodsModel Customergoods { get; set; }

        protected GoodCodeModel()
        {
        }

        public GoodCodeModel(
            Guid id, 
            string productCode, 
            int quantity, 
            int plannedStorageSlots, 
            CustomerGoodItemStatusModel status,
            string customerOrderNo
        ) : base(id)
        {
            ProductCode = productCode;
            Quantity = quantity;
            PlannedStorageSlots = plannedStorageSlots;
            Status = status;
            CustomerOrderNo = customerOrderNo;
        }
    }
}
